package androidx.gdata.spreadsheets;

import androidx.gdata.LinkUrl;
import androidx.gdata.ThingWithLinks;

import java.io.Serializable;

public class ListEntry extends ThingWithLinks implements Serializable {

  private String id;
  private String updated;
  private String title;
  private GSX[] gsx;

  public ListEntry(String id, String updated, String title, LinkUrl[] links,
      GSX[] gsx) {
    super(links);
    this.id = id;
    this.updated = updated;
    this.title = title;
    this.gsx = gsx;
  }
  
  public GSX[] getGsx() {
    return gsx;
  }

  public String getId() {
    return id;
  }
  
  public String getEditUrl() {
    String editUrl = null;
    for (LinkUrl linkUrl : getLinks()) {
      if (linkUrl.getRel().equals("edit")) {
        return linkUrl.getHref();
      }
    }
    return editUrl;
  }
  
}
